/*******************************************************************************
 * Copyright (c) 2010 Marcelo Cataldo, Sangeeth Nambiar
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * DepsGraphEdge.java
 * 
 * Represents a unique edge/link in the dependency graph
 * 
 * Contributors:
 *    Marcelo Cataldo  - initial implementation 
 *    Sangeeth Nambiar - initial implementation
 *******************************************************************************/
package edu.cmu.isr.dinvenio.model;

public class DepsGraphEdge {
	/*
	 * 
	 */
	public String source;
	public String target;
	public double value;
	public java.awt.Color color;
	public DepsGraphLayer layer;	

	/*
	 * Constructors
	 */
	public DepsGraphEdge(String s, String t, double v,java.awt.Color c,DepsGraphLayer l) {
		this.source = s;
		this.target = t;
		this.value  = v;
		this.color = c;
		this.layer = l;
	}
	
	/*
	 * ACCESSOR methods
	 */
	public java.awt.Color getColor() {
		return color;
	}
	@Override
	public String toString() {
		//return source + " to " + target + " value :" + String.valueOf(value);
		//return String.valueOf(value);
		return "";
	}
	public String getToolTip() {
		//return source + " to " + target + ";" +String.valueOf(value);
		return this.toString();
	}
	public int getEdgeWeight(){
		return (int) this.value;
	}
}
